﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace DiaryPlanner
{
    
    public partial class MemoPost : UserControl
    {

      
        
        public Memo thisMemoObject;
        public int color = 0;// 0 yellow  1 blue   2 green   3 pink

        //date : 날짜
        //memoRichTextBox : 내용

        public MemoPost(Memo memoObject)
        {
            thisMemoObject = memoObject;
            InitializeComponent();
        }

        private void MemoPost_Load(object sender, EventArgs e)
        {

        }

        private void btnDelete_Click(object sender, EventArgs e)
        {

            thisMemoObject.nowMemoPost = this;

            MemoDeleteDialog memoDeleteDialogObject = new MemoDeleteDialog(thisMemoObject);//메모 삭제
            memoDeleteDialogObject.ShowDialog();
            

            //thisMemoObject.MemoList.Remove(this);
            //thisMemoObject.viewAllMemo();
        }

        private void btnEdit_Click(object sender, EventArgs e)
        {
            thisMemoObject.nowMemoPost = this;

            MemoEdit memoEditObject = new MemoEdit(thisMemoObject);//메모 수정
            memoEditObject.ShowDialog();

        }
    }
}
